﻿using System;
namespace CXedu.Model
{
	///<summary>
	///
	///</summary>
	public class UAdministrator : ModelBase<int>
	{
		#region 成员字段
		
		private int _loginCounts = default(Int32);
		private string _loginIP = String.Empty;
		private DateTime _loginTime = DateTime.Now;
		///<summary>
		///最后登录时间查询区间值
		///</summary>
		private DateTime[] _loginTimespan = null;
		private string _name = String.Empty;
		private string _pwd = String.Empty;
		private string _realName = String.Empty;
        private int _state = default(Int32);
        private string _moduleIds = String.Empty;
		
		#endregion
		
		#region 构造方法
		
		public UAdministrator() { }
		
		#endregion
		
		#region 成员方法
		
		public override int GetHashCode()
		{
			System.Text.StringBuilder sb = new System.Text.StringBuilder();
			sb.Append(this.GetType().FullName);
			sb.Append(_loginCounts);
			sb.Append(_loginIP);
			sb.Append(_loginTime);
			sb.Append(_name);
			sb.Append(_pwd);
			sb.Append(_realName);
            sb.Append(_state);
            sb.Append(_moduleIds);
			return sb.ToString().GetHashCode();
		}
		
		#endregion
		
		#region 成员属性
		
		///<summary>
		///登录次数
		///</summary>
		public int LoginCounts
		{
			get
			{
				return _loginCounts;
			}
			set
			{
				_loginCounts = value;
			}
		}
		///<summary>
		///最后登录IP
		///</summary>
		public string LoginIP
		{
			get
			{
				return _loginIP;
			}
			set
			{
				_loginIP = value;
			}
		}
		///<summary>
		///最后登录时间
		///</summary>
		public DateTime LoginTime
		{
			get
			{
				return _loginTime;
			}
			set
			{
				_loginTime = value;
			}
		}
		///<summary>
		///最后登录时间查询区间值
		///</summary>
		public DateTime[] LoginTimespan{
			get
			{
				return _loginTimespan;
			}
			set
			{
				_loginTimespan = value;
			}
		}
		///<summary>
		///用户登录名
		///</summary>
		public string Name
		{
			get
			{
				return _name;
			}
			set
			{
				_name = value;
			}
		}
		///<summary>
		///登录密码
		///</summary>
		public string Pwd
		{
			get
			{
				return _pwd;
			}
			set
			{
				_pwd = value;
			}
		}
		///<summary>
		///用户昵称
		///</summary>
		public string RealName
		{
			get
			{
				return _realName;
			}
			set
			{
				_realName = value;
			}
		}
		///<summary>
		///用户状态
		///</summary>
		public int State
		{
			get
			{
				return _state;
			}
			set
			{
				_state = value;
			}
		}
        ///<summary>
        ///用户状态
        ///</summary>
        public string ModuleIds
        {
            get
            {
                return _moduleIds;
            }
            set
            {
                _moduleIds = value;
            }
        }
		
        /// <summary>
        /// 自定义查询条件
        /// </summary>
        public string CustomWhere { get; set; }
		
		#endregion
	}
		
	public static class UAdministratorHash
	{
		public const string TopNum = "TopNum";
		public const string OrderField = "OrderField";
		public const string OrderDirection = "OrderDirection";
		public const string Id = "Id";
		public const string LoginCounts = "LoginCounts";
		public const string LoginIP = "LoginIP";
		public const string LoginTime = "LoginTime";
		public const string Name = "Name";
		public const string Pwd = "Pwd";
		public const string RealName = "RealName";
        public const string State = "State";
        public const string ModuleIds = "ModuleIds";
		
        public const string CustomWhere = "CustomWhere";
	}
}